package com.yl.pattern.behavioralmodel.state.after;

/**
 * @Author 小羊
 * @Date 1/11/2024下午 2:49
 * @ClassName OpeningState
 * @Description 电梯关闭状态类
 */
public class ClosingState extends LiftState{

    @Override
    public void close() {
        System.out.println("电梯门关闭...");
    }

    @Override
    public void open() {
        super.context.setState(Context.OPENING_STATE);
        super.context.open();
    }


    @Override
    public void run() {
        super.context.setState(Context.RUNNING_STATE);
        super.context.run();
    }

    @Override
    public void stop() {
        super.context.setState(Context.STOPPING_STATE);
        super.context.stop();
    }
}
